package test.designpattern.dynamicProxy;

public class TimeMonitor {
    private static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void start() {
        threadLocal.set(System.currentTimeMillis());
    }

    public static void finished(String name) {
        System.out.println(name + "方法运行了" + (System.currentTimeMillis() - threadLocal.get()) + "毫秒时间！");
    }
}
